package com.suse.jd_system_server.service.impl;

import com.github.pagehelper.PageHelper;
import com.suse.jd_system_server.Vo.HotelPageListVo;
import com.suse.jd_system_server.auto.mapper.Shb_hotelPageMapper;
import com.suse.jd_system_server.service.Shb_hotelPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Transactional
@Service
public class Shb_hotelPageServiceImpl implements Shb_hotelPageService {

     @Autowired
     private Shb_hotelPageMapper mapper;

     @Override
     public List<HotelPageListVo> selectHotelList(Map<String, Object> param) {
          param.put("pageNum",(Integer.parseInt(param.get("pageNum").toString())-1)*Integer.parseInt(param.get("pageSize").toString()));
          List<HotelPageListVo> hotelPageListVos = mapper.selectHotelLists(param);
          return hotelPageListVos;
     }
}
